home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / string.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  2.3 KB  |  109 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     String.h
  4.     String handling
  5.     
  6.     Copyright Apple Computer,Inc.  1987-1990, 1993, 1994
  7.     All rights reserved
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef __STRING__
  13. #define __STRING__
  14.  
  15. #ifndef __size_t__
  16. #define __size_t__
  17. typedef unsigned int size_t;
  18. #endif
  19.  
  20. #ifndef NULL
  21. #define NULL 0
  22. #endif
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. #ifdef __CFM68K__
  29.     #ifdef UsingSharedLibs
  30.         #pragma lib_export on
  31.     #endif
  32. #endif
  33.  
  34. /*
  35.  *    Copying functions
  36.  */
  37.  
  38. void *memcpy (void *s1, const void *s2, size_t n);
  39. void *memmove (void *s1, const void *s2, size_t n);
  40. char *strcpy (char *s1, const char *s2);
  41. char *strncpy (char *s1, const char *s2, size_t n);
  42.  
  43. /* Apple library extentions.  The prefered mechanism for enabling these is by defining
  44.  * __useAppleExts__.  In the absence of this symbol, the __STDC__ symbol is used to 
  45.  * enable or disable these extentions. */
  46.  
  47. /* CFront can't handle the pretty version of this conditional 
  48. #if defined (__useAppleExts__) || \
  49.     ((defined (applec) && ! defined (__STDC__)) || \
  50.      (defined (__PPCC__) && __STDC__ == 0))
  51. */
  52. #if defined (__useAppleExts__) || ((defined (applec) && ! defined (__STDC__)) || (defined (__PPCC__) && __STDC__ == 0))
  53.  
  54. void *memccpy(void *s1, const void *s2, int c, size_t n);
  55.  
  56. #endif
  57.  
  58. /*
  59.  *    Concatenation functions
  60.  */
  61.  
  62. char *strcat (char *s1, const char *s2);
  63. char *strncat (char *s1, const char *s2, size_t n);
  64.  
  65. /*
  66.  *    Comparison functions
  67.  */
  68.  
  69. int memcmp (const void *s1, const void *s2, size_t n);
  70. int strcmp (const char *s1, const char *s2);
  71. int strcoll (const char *s1, const char *s2);
  72. int strncmp (const char *s1, const char *s2, size_t n);
  73. size_t strxfrm (char *s1, const char *s2, size_t n);
  74.  
  75.  
  76. /*
  77.  *    Search functions
  78.  */
  79.  
  80. void *memchr (const void *s, int c, size_t n);
  81. char *strchr (const char *s, int c);
  82. size_t strcspn (const char *s1, const char *s2);
  83. char * strpbrk (const char *s1, const char *s2);
  84. char *strrchr (const char *s, int c);
  85. size_t strspn (const char *s1, const char *s2);
  86. char *strstr (const char *s1, const char *s2);
  87. char *strtok (char *s1, const char *s2);
  88.  
  89.  
  90. /*
  91.  *    Miscellaneous functions
  92.  */
  93.  
  94. void *memset (void *s, int c, size_t n);
  95. char *strerror (int errnum);
  96. size_t strlen (const char *s);
  97.  
  98. #ifdef __CFM68K__
  99.     #ifdef UsingSharedLibs
  100.         #pragma lib_export off
  101.     #endif
  102. #endif
  103.  
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107.  
  108. #endif
  109.